import Vue from 'vue'
import Vuex from 'vuex'
import getters from './getters'
import app from './modules/app'
import settings from './modules/settings'
import user from './modules/user'
import createPersistedstate from 'vuex-persistedstate'
Vue.use(Vuex)

export default new Vuex.Store({
  modules: {
    app,
    settings,
    user
  },
  state: {

  },
  mutations: {

  },
  actions: {

  },
  getters,
  plugins: [
    createPersistedstate({
      // key: 'getArr',// 存数据的key名   自定义的  要有语义化
      paths: ['user', 'settings', 'app'] // 要把那些模块加入缓存
    })
  ]
})
